Monica21
|
Master
|
|
|
Reged: 01/16/03
|
Posts: 6109
|
Loc: D'Hara
|
|
|
Is there a way to disable the Take function for books? I have in-game books that need to have scripts attached, so they are unique but I also need them to be unable to be put in inventory or else they won't be recognized by another script.
-------------------- ElricM Web Portal
Telesphoros' List 'o Mods
kwshipman's List of House Mods
Post Extras:
|
Grumpy
|
Disciple
|
|
|
Reged: 08/02/02
|
Posts: 1590
|
|
|
|
if ( Player->GetItemCount book == 1 ) RemoveItem book 1 Position book x y z zrot endif
I don't think there's a way to disable the "take" option, so you'ld have to use a script something like the above. Unfortunately, this cannot be on the book itself, but will need to be on a hidden activator someplace in the vicinity. If you try putting it on the book itself, the game will crash when the "removeitem" function runs. The "Position" function replaces the book...
There is another function called "SetAtStart", but I've never seen it used before (at least like this). Theoretically, you could do something like this:
if ( Player->GetItemCount book == 1 ) book->SetAtStart endif
Something else you could try:
if ( Player->GetItemCount book == 1 ) Drop book 1 endif
If any of these do work, I doubt they will satisfy your conditions. For instance, using the first one, I'm not sure the player would be able to read the book.
Maybe this will give somebody else some ideas though...
-------------------- Grumpy
My mods
Post Extras:
|
JOG
|
Curate
|
|
|
Reged: 09/15/02
|
Posts: 745
|
|
|
|
Actually it's quite simple to disable the take function
Code:
begin book_no_take
if ( Onactivate == 1 )
Activate
endif
end
This will open the book again (with removed Take Button) when you click on "Take".
If you need a OnActivate-Script (e.g journal Entry) but want the player to be able to take the book you need to test on (Menumode == 0) before Activating...
-------------------- Havish (Updated to v1.2 !!!)
Pirates! (WIP)
My Morrowind Corner
Post Extras:
|
Monica21
|
Master
|
|
|
Reged: 01/16/03
|
Posts: 6109
|
Loc: D'Hara
|
|
|
Thanks, Grumpy and JOG.
Stupid question time. I currently have the following script attached to keep the books disabled until another script enables them:
Code:
Begin _MMBookDisable
short doOnce ; if ( doOnce == 0 ) Disable Set doOnce to 1 endif
end _MMBookDisable
How would I use both the disable function and no-take function in the same script?
-------------------- ElricM Web Portal
Telesphoros' List 'o Mods
kwshipman's List of House Mods
Post Extras:
|
JOG
|
Curate
|
|
|
Reged: 09/15/02
|
Posts: 745
|
|
|
|
Just merge the scripts:
Code:
Begin _MMBookDisable short doOnce if ( Onactivate == 1 ) Activate endif if ( doOnce == 0 ) Disable Set doOnce to 1 endif end _MMBookDisable
-------------------- Havish (Updated to v1.2 !!!)
Pirates! (WIP)
My Morrowind Corner
Post Extras:
|
Monica21
|
Master
|
|
|
Reged: 01/16/03
|
Posts: 6109
|
Loc: D'Hara
|
|
|
I was hoping it would be that easy, but when it comes to scripting I don't like to assume.
Thanks!
-------------------- ElricM Web Portal
Telesphoros' List 'o Mods
kwshipman's List of House Mods
Post Extras:
|
|
|
Begin _MMBookDisable short doOnce if ( Onactivate == 1 ) Activate endif if ( doOnce == 0 ) Disable Set doOnce to 1 endif end _MMBookDisable
Hmm.... if I read this correctly, the book immediately disables itself when the cell is loaded since doOnce is initialized as zero.
Post Extras:
|
ManaUser
|
Master
|
|
|
Reged: 05/31/00
|
Posts: 6115
|
Loc: Long Beach, CA, USA
|
|
|
Probably that's what she wants, and it get's enabled leter by another script.
Post Extras:
|